package com.sheyu.mall.order.feign;

import com.sheyu.common.utils.R;
import com.sheyu.mall.order.vo.WareSkuLockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author sheyu
 * @Desciption:
 * @date 2020/9/10 11:14 上午
 */
@FeignClient("ware-service")
public interface WareFeignService {

    /**
     *
     * @param skuIds
     * @return
     */
    @PostMapping(value = "/ware/waresku/hasStock")
    R getSkuHasStock(@RequestBody List<Long> skuIds);


    @GetMapping(value = "/ware/wareinfo/fare")
    public R getFare(@RequestParam("addrId") Long addrId);

    @PostMapping("/ware/waresku/lock/order")
    R orderLockStock(WareSkuLockVo lockVo);
}
